Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Subtracting Points

QuickDraw 3D provides routines that you can use to subtract a point of a given dimension from another of the same dimension. All of these routines return a vector that is the difference of the two points.

Q3Point2D_Subtract

You can use the Q3Point2D_Subtract function to subtract one two-dimensional point from another.

TQ3Vector2D *Q3Point2D_Subtract (
                     const TQ3Point2D *p1,
                     const TQ3Point2D *p2,
                     TQ3Vector2D *result);
p1
A two-dimensional point.
p2
A two-dimensional point.
result
On exit, a two-dimensional vector that is the result of subtracting the point p2 from p1 .

DESCRIPTION

The Q3Point2D_Subtract function returns, as its function result and in the result parameter, the two-dimensional vector that is the result of subtracting the point p2 from p1 .

Q3Param2D_Subtract

You can use the Q3Param2D_Subtract function to subtract one two-dimensional parametric point from another.

TQ3Vector2D *Q3Param2D_Subtract (
                     const TQ3Param2D *p1,
                     const TQ3Param2D *p2,
                     TQ3Vector2D *result);
p1
A two-dimensional parametric point.
p2
A two-dimensional parametric point.
result
On exit, a two-dimensional vector that is the result of subtracting the parametric point p2 from p1 .

DESCRIPTION

The Q3Param2D_Subtract function returns, as its function result and in the result parameter, the two-dimensional vector that is the result of subtracting the parametric point p2 from p1 .

Q3Point3D_Subtract

You can use the Q3Point3D_Subtract function to subtract one three-dimensional point from another.

TQ3Vector3D *Q3Point3D_Subtract (
                     const TQ3Point3D *p1,
                     const TQ3Point3D *p2,
                     TQ3Vector3D *result);
p1
A three-dimensional point.
p2
A three-dimensional point.
result
On exit, a three-dimensional vector that is the result of subtracting the point p2 from p1 .

DESCRIPTION

The Q3Point3D_Subtract function returns, as its function result and in the result parameter, the three-dimensional vector that is the result of subtracting the point p2 from p1 .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |